package ClassLoadTest;

/**
 * 有继承关系的类的加载顺序
 * @author: 叶子
 * @date: 2022/02/11 14:32
 **/
public class Father {
    private int i = test();
    private static int j = method();
    static {
        System.out.print("(1)");
    }
    Father(){
        System.out.print("(2)");
    }
    {
        System.out.print("(3)");
    }
    public int test() {
        System.out.print("(4)");
        return 1;
    }



    public static int method() {
        System.out.print("(5)");
        return 2;
    }
}